#pragma once

#include "Ship.h"
#include "TotalEnergy.h"
#include "EnergyBar.h"
#include "SpriteNode.h"

class FriendlyShip : public Ship
{
private:
	TotalEnergy totEnergy;			//The total energy that the player ship has (this will be incremented as energy is added or subtracted from shields and energy weapon)
	EnergyBar	Shields;			//Energy bar that represents the ships shields (to use it energy must be taken from total energy)
	EnergyBar	EnergyWeapon;		//Energy bar that represents the energy weapon (to use it energy must be taken from total energy)
	int			numMissles;			//Number of missles the friendly ship currently has
	bool		docked;				//Determines if the player ship is docked at a space station or not
	SpriteNode	sprite;				//Sprite node (represents the friendly ship sprite) to be added to the draw list
	SpriteInfo	spriteInfo;			//Sprite Information which will define various variables for the friendly ship sprite
public:
	//Constructor
	FriendlyShip();

	//////////////////////////////////////////////////////////////////////////
	// Name:		Init
	// Parameters:	void
	// Return:		void
	// Description: This function is only run once and will initialize any
	//				variables that are needed.
	//////////////////////////////////////////////////////////////////////////
	void Init();

	//////////////////////////////////////////////////////////////////////////
	// Name:		Move
	// Parameters:	XY		- XY coordinates of the sector that the friendly
	//						  ship is moving to.
	// Return:		void
	// Description: This function will set the position of the friendly
	//				ship's sprite to the chosen sector's XY position.
	//////////////////////////////////////////////////////////////////////////
	void Move(XY);

	//////////////////////////////////////////////////////////////////////////
	// Name:		FireMissle
	// Parameters:	void
	// Return:		bool
	// Description: This function will determine if a missle can be fired
	//				or not as well as increment the number of missles
	//				appropriately.
	//////////////////////////////////////////////////////////////////////////
	bool FireMissle();

	//////////////////////////////////////////////////////////////////////////
	// Name:		Dock
	// Parameters:	void
	// Return:		void
	// Description: This function sets the docked variable accordingly.
	//////////////////////////////////////////////////////////////////////////
	void Dock();

	//////////////////////////////////////////////////////////////////////////
	// Name:		UnDock
	// Parameters:	void
	// Return:		void
	// Description: This function sets the docked variable accordingly.
	//////////////////////////////////////////////////////////////////////////
	void UnDock();

	//////////////////////////////////////////////////////////////////////////
	// Name:		Draw
	// Parameters:	void
	// Return:		void
	// Description: This function will add the friendly ship's sprite node
	//				to the draw list as well as draw any objects that friendly
	//				ship contains (such as the meters and the missles).
	//////////////////////////////////////////////////////////////////////////
	void Draw();
};